package com.erhuogo.dao;

import java.util.List;

import com.erhuogo.entity.Favorite;
import com.erhuogo.entity.Member;

/**
 * 会员Dao接口
 * @author aibinxiao
 * @date 2016年10月9日 下午4:18:45
 */
public interface MemberDao{
	
	// 1.会员登陆Dao接口
	public Member login(String username, String password);

	// 2.验证手机号是否已经注册Dao接口
	public boolean findByPhoneNumber(String phoneNumber);

	// 3.用户注册Dao接口
	public boolean addMember(Member member);

	// 4.计算多少符合条件记录条数Dao接口
	public int countByParams(String id, String nickName, String startDate, String endDate);

	// 5.查询出指定开始索引和条数的记录集合Dao接口
	public List<Member> findPageByParams(String id, String nickName, String startDate, String endDate, int startIndex,
			int records);

	// 6.根据ID屏蔽用户Dao接口
	public void updateStatus(Integer memId, Integer status) throws Exception ;
	
	
	public Member getMemberById(String id);
	
	public boolean checkPassword(Member member);
	
	public boolean alterPws(String memId, String newPws);
	
	public boolean uploadPic(int memId, String path);
	
	public int getCollectionsNum(int memId);
	public List<Favorite> getCollections(int memId,int offset, int size);
	
	public boolean deleteCollect(int fId);
}
